package util

import (
	"reflect"
	"strings"
)

func SimpleTypeName(v interface{}) string {
	tp := reflect.TypeOf(v)
	var tpStr string
	if tp.Kind() == reflect.Ptr {
		tpStr = tp.Elem().String()
	} else {
		tpStr = tp.String()
	}
	ind := strings.LastIndex(tpStr, ".")
	return tpStr[ind+1 :]
}